<template>
  <!--给input元素绑定原生input事件，触发input事件时，进而触发update:model-value事件-->
  <input 
    type="text" 
    :value="que"
    @input="emit('update:que',(<HTMLInputElement>$event.target).value)"
  > <br>
  <input 
    type="text" 
    :value="ans"
    @input="emit('update:ans',(<HTMLInputElement>$event.target).value)"
  >
</template>

<script lang="ts" setup name="AtwrlInput">
  // defineProps(['modelValue'])
  // const emit = defineEmits(['update:modelValue'])
  defineProps(['que','ans'])
  // 声明事件
  const emit = defineEmits(['update:que','update:ans'])
</script>

<style scoped>
  input{
    border: 1px solid #000;
    background-color: skyblue;
    height: 30px;
    font-size: 20px;
    color: white;
  }
</style>